<!DOCTYPE html>
<html lang="zh-cmn-Hans">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
	<meta name="format-detection" content="telephone=no, date=no, address=no, email=no, url=no">
	<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
	<meta http-equiv="Pragma" content="no-cache">
	<meta http-equiv="Expires" content="0">
	{include file="Public:header" /}
	<title>门店首页</title>
	<meta name="description" content="">
	<link rel="stylesheet" href="__WECHATCSS__/main.css">
	<script type="text/javascript">
		(function (win, doc) {
			if (!win.addEventListener) return;
			var html = document.documentElement;
			function setFont() {
				var cliWidth = html.clientWidth;
				html.style.fontSize = 100 * (cliWidth / 750) + 'px';
			}
			win.addEventListener('resize', setFont, false);
			setFont();
		})(window, document);
	</script>
</head>

<body>
	<div class="container">
		<div class="head">
			<div class="PersonalImgNav">
				<div class="nav">
					<img src="{$member_info.headimgurl}" />
				</div>
			</div>
			<div class="map-text">
				您所在位置<br />
				<p>{$storeInfo.name}</p>
			</div>
		</div>
		<div class="shop-content">
			<h1>送货列表</h1>
			{volist name="list" id="v"}
			<div class="YH">
				<div>
					<i>订单号：{$v.order_sn}</i>
					<i>座位：{$v.seat_num}</i>
					<i>分类：</i>
					{if condition="$v.son && count($v.son)>0"}
					{volist name="v.son" id="vitem"}
					<i>
						{$vitem.goods_name}*{$vitem.goods_num}
					</i>
					{/volist}
					{/if}
					操作：<a class="confirm_ship" data-id="{$v.order_id}">确认送达</a>
					<br />
				</div>
			</div>
			{/volist}
			<input type="hidden" name="store_id" value="{$storeInfo.id}">
		</div>
	</div>
	<script src="__WECHATASSETS__/jquery.min.js"></script>
	<script src="__WECHATASSETS__/zepto.min.js"></script>
	<script src="__WECHATJS__/main.js"></script>
	{include file="Public:footer" /}

	<script type="text/javascript">
		$(function () {
			$('.confirm_ship').click(function () {
				if (confirm('确定已送达？')) {
					$order_id = $(this).attr('data-id');
					$.ajax({
						url: "{:Url('Order/confirmshipping')}",
						data: { order_id: order_id },
						type: "post",
						dataType: "json",
						success: function (res) {
							alert(res.msg);
							if (res.status > 0) {
								window.location = window.location.href;
							}
						}
					});
				}
			});
		});
	</script>
</body>

</html>